package org.ipb.controller.modul.statuspegawai;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.ipb.model.StatusPegawai;

import util.hibernate.DAO;

import com.opensymphony.xwork2.ActionSupport;

public class ActionJsonMap extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Map<Integer, String> listStatusPegawai = new HashMap<Integer, String>();

	// private List<StatusKawin> listStatusKawin;
	@SuppressWarnings("unchecked")
	public String execute() {
		DAO<Integer> dao = new DAO<Integer>();
		List<StatusPegawai> list = (List<StatusPegawai>) dao.findAll(StatusPegawai.class);

		for (StatusPegawai f : list) {
			listStatusPegawai.put(f.getId(), f.getNama());
		}
		dao.close();
		return SUCCESS;
	}

	public Map<Integer, String> getListStatusPegawai() {
		return listStatusPegawai;
	}

	public void setListStatusPegawai(Map<Integer, String> listStatusPegawai) {
		this.listStatusPegawai = listStatusPegawai;
	}

	

	

}
